package com.shop.shoporder.service.impl;

import com.shop.shoporder.entity.GroupbuyParticipate;
import com.shop.shoporder.mapper.GroupbuyParticipateMapper;
import com.shop.shoporder.service.GroupbuyParticipateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("groupbuyParticipateService")
public class GroupbuyParticipateServiceImpl implements GroupbuyParticipateService {

    @Autowired
    GroupbuyParticipateMapper groupbuyParticipateMapper;


    @Override
    public int deleteByPrimaryKey(int participateId) {
        return groupbuyParticipateMapper.deleteByPrimaryKey(participateId);
    }

    @Override
    public int insert(GroupbuyParticipate record) {
        return groupbuyParticipateMapper.insert(record);
    }

    @Override
    public int insertSelective(GroupbuyParticipate record) {
        return groupbuyParticipateMapper.insertSelective(record);
    }

    @Override
    public GroupbuyParticipate selectByPrimaryKey(int participateId) {
        return groupbuyParticipateMapper.selectByPrimaryKey(participateId);
    }

    @Override
    public int updateByPrimaryKeySelective(GroupbuyParticipate record) {
        return groupbuyParticipateMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(GroupbuyParticipate record) {
        return groupbuyParticipateMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<GroupbuyParticipate> getGroupbuyParticipate(int groupbuyId) {
        return groupbuyParticipateMapper.getGroupbuyParticipate(groupbuyId);
    }
//
    @Override
    public GroupbuyParticipate getGroupbuyPartied(int groupbuyId, int userNoId) {
        return groupbuyParticipateMapper.getGroupbuyPartied(groupbuyId, userNoId);
    }


}
